package Exp5_1;

public class Course {
    private String cno;
    private String cname;
    private double credit;
    public Course(){

    }
    public Course(String cno,String cname,double credit) {
            if(credit>=6||credit<=0.5)
                throw new CreditException("credit should between 0.5 and 6!credit should between 0.5 and 6!");
            this.cno = cno ;
            this.cname = cname;
            this.credit  =credit;
    }
}
